﻿@using Microsoft.AspNetCore.Components.Web
@namespace BlazorBrTest.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <base href="~/" />
    <link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
    <link href="css/site.css" rel="stylesheet" />
    <link href="BlazorBrTest.styles.css" rel="stylesheet" />
    <component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
</head>
<body>
    @RenderBody()

    <div id="blazor-error-ui">
        <environment include="Staging,Production">
            An error has occurred. This application may no longer respond until reloaded.
        </environment>
        <environment include="Development">
            An unhandled exception has occurred. See browser dev tools for details.
        </environment>
        <a href="" class="reload">Reload</a>
        <a class="dismiss">🗙</a>
    </div>

    <script src="_framework/blazor.server.js"></script>
    <script>
        Blazor.start({
            reconnectionHandler: {
                onConnectionDown: (options, error) => console.error(error),
                onConnectionUp: () => console.log("Up, up, and away!")
            },
            reconnectionOptions: {
                maxRetries: 3,
                retryIntervalMilliseconds: 2000
            }
        });
        window.addEventListener('pagehide', () => {
            console.log("pagehide")
            Blazor.disconnect();
        });
    </script>
</body>
</html>
